<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表</title>
    <link rel="stylesheet" href="./css/style.css">
</head>

<body>
    <div class="header">
        <h2>菜品列表</h2>
        <button id="cartBtn">购物车界面</button>
    </div>
    <div class="container">

    </div>
    <script src="./js/util.js"></script>
    <script src="js/template-web.js"></script>
    <script type="text/html" id="show">
        {{each products}}
        <div class="item">
            <div class="wraper-l">
                <img src="{{$value.picture}}" width="100" height="100" alt="book1">
            </div>
            <div class="wrapper-r">
                <h2>{{$value.product}}</h2>
                <p>真好吃</p>
                <p>价格 <span>￥{{$value.price}}</span></p>
                <a href="./detail.html" class="todetail" data-index="{{$value.id}}">查看详情</a>
                <button data-index="{{$value.id}}">加入购物车</button>
            </div>
        </div>
        {{/each}}
    </script>
    <script src="./js/index.js"></script>
</body>

</html>